package com.ruiysoft.controller.order;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.ruiysoft.controller.order.api.InnerorderApi;
import com.ruiysoft.entity.order.OrderMain;
import com.ruiysoft.pub.core.Result;
import com.ruiysoft.service.order.IOrderInnerService;
import io.swagger.annotations.ApiParam;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2018-11-24T19:13:13.635+08:00")

@RestController
public class InnerorderApiController implements InnerorderApi {

    private static final Logger log = LoggerFactory.getLogger(InnerorderApiController.class);

    private final ObjectMapper objectMapper;

    private final HttpServletRequest request;

    private final IOrderInnerService orderInnerService;

    @org.springframework.beans.factory.annotation.Autowired
    public InnerorderApiController(ObjectMapper objectMapper, HttpServletRequest request, IOrderInnerService orderInnerService) {
        this.objectMapper = objectMapper;
        this.request = request;
        this.orderInnerService = orderInnerService;
    }

    @Override
    public Result<OrderMain> innerorderSign4orderOrderNoGet(@ApiParam(value = "订单号",required=true) @PathVariable("orderNo") String orderNo) {
        return orderInnerService.sign4Order(orderNo);
    }

}
